import { ExportExcel } from "@/utils/excel/exportExcel";

export default {
  data() {
    return {};
  },
  methods: {
    download() {
      const excel = new ExportExcel();
      const header = [
        {
          label: "客户简称",
          prop: "",
          align: "center",
          childern: this.dataGrid.columns
        }
      ];
      console.log(header, "header");
      excel.exportData(this.dataGrid.data, header, "简单导出", this.exportStyleCell, [{ wpx: 180 }, { wpx: 180 }]);
    },
    exportStyleCell(R, C, cell) {
      return {
        fill: {
          patternType: "solid",
          fgColor: { theme: 3, tint: 0.3999755851924192, rgb: "FDF6EC" },
          bgColor: { theme: 7, tint: 0.3999755851924192, rgb: "FDF6EC" }
        },
        font: {
          name: "宋体",
          sz: 12,
          color: { rgb: "ff0000" },
          bold: true,
          italic: false,
          underline: false
        }
      };
    }
  }
};
